package com.lvmama.client.nps;

import com.github.pagehelper.PageInfo;
import com.lvmama.common.result.Result;
import com.lvmama.pojo.dto.nps.NPSCommitDTO;
import com.lvmama.pojo.entity.nps.NPSCommit;
import com.lvmama.pojo.entity.nps.NPSStatistics;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
import java.util.Map;

@FeignClient("rhino-web-service")
@RequestMapping("${server.servlet.context-path}")
public interface NPSClient {

    @RequestMapping(method = RequestMethod.POST, value = "/nps/queryNpsCommitList")
    Result<PageInfo<NPSCommit>> queryNpsCommitList(@RequestBody NPSCommitDTO npsCommitDTO);

    @RequestMapping(method = RequestMethod.POST, value = "/nps/npsStatistics")
    Result<NPSStatistics> npsStatistics(@RequestBody NPSCommitDTO npsCommitDTO);

    @RequestMapping(method = RequestMethod.POST, value = "/nps/exportQuestionnaire")
    Result<Map<String,List<Object[]>>>  exportQuestionnaire(@RequestBody NPSCommitDTO npsCommitDTO);


}
